import request from '@/utils/request'

// 验证码请求
export function captchaApi() {
  return request({
    url: '/captcha',
    method: 'get',
    params: {
      key: 'key'
    }
  })
}

// 登录请求
export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

// 查询用户可用的所有菜单
export function getUserMenuApi() {
  return request({
    url: '/menus',
    method: 'get'
  })
}

// 获取树状机构信息
export function getOrganApi() {
  return request({
    url: '/business-hall/tree',
    method: 'get'
  })
}
